Rotating Pyramid

Charlie Veniot2nd March 2022 at 9:16pm
declare sub l(a, b, c, d)
'_Title "Rotating Pyramid" 'b+ 2022-03-01
Screen 18
cx = 640 / 2
ax = cx: ay = 50 ' apex
ex = cx: ey = 330 ' ellipse
xr = cx * .7: yr = .33 * xr
a = 0
_Pi = 3.141592653589
Do
    Cls
    x1 = ex + xr * Cos(a): y1 = ey + yr * Sin(a)
    x2 = ex + xr * Cos(a + _Pi * .5): y2 = ey + yr * Sin(a + _Pi * .5)
    x3 = ex + xr * Cos(a + _Pi): y3 = ey + yr * Sin(a + _Pi)
    x4 = ex + xr * Cos(a + _Pi * 1.5): y4 = ey + yr * Sin(a + _Pi * 1.5)
    call l(x1, y1, x2, y2)
    call l(x2, y2, x3, y3)
    call l(x3, y3, x4, y4)
    call l(x4, y4, x1, y1)
    call l(x1, y1, ax, ay)
    call l(x2, y2, ax, ay)
    call l(x3, y3, ax, ay)
    call l(x4, y4, ax, ay)
    a = a + .01
	 sleep 0.0250
LOOP WHILE INKEY$ = ""
Sub l(a, b, c, d) ' way easier to code lines
    Line (a, b)-(c, d), &hffff00
End Sub